Rails 6: Coerce ReloadModelsTest test on Windows #812
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
ReloadModelsTest#test_has_one_with_reload
test fails on Windows because too many arguments are being passed to create the new subprocess (https://github.com/rails/rails/blob/v6.0.3/activesupport/lib/active_support/testing/isolation.rb#L93).On the AppVeyor CI, when all tests are being run the test is calling
IO.popen
with 442 arguments (see https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32821521/job/e47ljgrcbpmmiuyf). Because of the number of arguments or the total length of the arguments aArg list too long - C:/Ruby25-x64/bin/ruby.exe (Errno::E2BIG)
exception is being thrown.If just the
ReloadModelsTest#test_has_one_with_reload
is run then the number of arguments inORIG_ARGV
is reduced to 2 and the test passes. See https://ci.appveyor.com/project/wpolicarpo/activerecord-sqlserver-adapter/builds/32821146/job/nr3abuyi476eu0s7Coercing the
ReloadModelsTest#test_has_one_with_reload
test if being run on a Windows environment.